package com.wshl.aijiuunion.view.adapter;

import android.support.v7.widget.RecyclerView;
import android.widget.TextView;

import com.wshl.aijiuunion.R;
import com.wshl.aijiuunion.view.bean.CateBean;

import cn.bingoogolapple.baseadapter.BGARecyclerViewAdapter;
import cn.bingoogolapple.baseadapter.BGAViewHolderHelper;

public class CateAdapter extends BGARecyclerViewAdapter<CateBean> {
    public CateAdapter(RecyclerView recyclerView) {
        super(recyclerView, R.layout.item_cate);
    }

    @Override
    protected void fillData(BGAViewHolderHelper helper, int position, CateBean model) {
        int status = model.getStatus();
        TextView tvCate = helper.getTextView(R.id.tv_cate);
        if (status==1) {
            tvCate.setSelected(true);
        }else{
            tvCate.setSelected(false);
        }
        helper.setText(R.id.tv_cate, model.getName());
    }
}
